Skip to content

Classify MySQL LinearRing WKB parse error as unsupported datatype#4274

Merged
Jeremyyang920 merged 2 commits into
mainfrom
classify-mysql-geometry-linear-ring-error
May 5, 2026
Merged

Classify MySQL LinearRing WKB parse error as unsupported datatype#4274
Jeremyyang920 merged 2 commits into
mainfrom
classify-mysql-geometry-linear-ring-error

Conversation

@Jeremyyang920

Copy link
Copy Markdown
Contributor

Match the specific geom-library failure "Points of LinearRing do not form a closed linestring" produced via processGeometryData and surface it to the user as ErrorUnsupportedDatatype with code UNSUPPORTED_GEOMETRY_LINEAR_RING_NOT_CLOSED. Other "failed to parse geometry WKB" errors continue to fall through so we can spot unclassified cases.

Resolves DBI-732

Match the specific geom-library failure "Points of LinearRing do not
form a closed linestring" produced via processGeometryData and surface
it to the user as ErrorUnsupportedDatatype with code
UNSUPPORTED_GEOMETRY_LINEAR_RING_NOT_CLOSED. Other "failed to parse
geometry WKB" errors continue to fall through so we can spot
unclassified cases.

Resolves DBI-732

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread flow/alerting/classifier.go
@Jeremyyang920 Jeremyyang920 requested review from ilidemi and jgao54 May 5, 2026 20:33
@Jeremyyang920 Jeremyyang920 marked this pull request as ready for review May 5, 2026 20:33
@claude

claude Bot commented May 5, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Comment thread flow/alerting/classifier.go
Comment thread flow/alerting/classifier.go
Comment thread flow/alerting/classifier.go Outdated
@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
2228 3 2225 203
View the top 3 failed test(s) by shortest run time
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMySQL_CH_Cluster
Stack Traces | 0.01s run time
=== RUN   TestPeerFlowE2ETestSuiteMySQL_CH_Cluster
=== PAUSE TestPeerFlowE2ETestSuiteMySQL_CH_Cluster
=== CONT  TestPeerFlowE2ETestSuiteMySQL_CH_Cluster
--- FAIL: TestPeerFlowE2ETestSuiteMySQL_CH_Cluster (0.01s)
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_Column_Position_Shifting_DDL_Error/change_column_after
Stack Traces | 5.01s run time
=== RUN   TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_Column_Position_Shifting_DDL_Error/change_column_after
    testing.go:1913: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test
--- FAIL: TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_Column_Position_Shifting_DDL_Error/change_column_after (5.01s)
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_Column_Position_Shifting_DDL_Error
Stack Traces | 24.4s run time
=== RUN   TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_Column_Position_Shifting_DDL_Error
=== PAUSE TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_Column_Position_Shifting_DDL_Error
=== CONT  TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_Column_Position_Shifting_DDL_Error
2026/05/05 20:48:47 INFO Received AWS credentials from peer for connector: ci x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/05/05 20:48:47 INFO Received AWS credentials from peer for connector: clickhouse x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
    clickhouse_mysql_test.go:1236: WaitFor waiting on initial 2026-05-05 20:48:51.819691634 +0000 UTC m=+710.019190382
2026/05/05 20:48:51 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_gqe1sszw.test_position_shift_drop_column
    clickhouse_mysql_test.go:1244: WaitFor waiting for error message 2026-05-05 20:48:51.867999727 +0000 UTC m=+710.067498474
2026/05/05 20:48:51 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_hyfmeluh.test_date_coercion
    clickhouse_mysql_test.go:1269: WaitFor finish 2026-05-05 20:48:52.871301237 +0000 UTC m=+711.070799984
2026/05/05 20:48:52 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_hyfmeluh.test_date_coercion
    clickhouse_mysql_test.go:1269: Finished Status Canceled
    clickhouse_mysql_test.go:1236: WaitFor waiting on initial 2026-05-05 20:48:57.928634831 +0000 UTC m=+716.128133569
2026/05/05 20:48:57 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_gqe1sszw.test_position_shift_add_column_after
    clickhouse_mysql_test.go:1244: WaitFor waiting for error message 2026-05-05 20:48:57.982975359 +0000 UTC m=+716.182474116
    clickhouse_mysql_test.go:1269: WaitFor finish 2026-05-05 20:48:58.986113937 +0000 UTC m=+717.185612674
    clickhouse_mysql_test.go:1269: Finished Status Canceled
    clickhouse_mysql_test.go:1236: WaitFor waiting on initial 2026-05-05 20:49:05.046478614 +0000 UTC m=+723.245977361
2026/05/05 20:49:05 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_gqe1sszw.test_position_shift_modify_column_first
    clickhouse_mysql_test.go:1244: WaitFor waiting for error message 2026-05-05 20:49:05.091960822 +0000 UTC m=+723.291459559
2026/05/05 20:49:05 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mychcl_ult7wz2o.test_nullengine
    clickhouse_mysql_test.go:1269: WaitFor finish 2026-05-05 20:49:06.101024435 +0000 UTC m=+724.300523182
    clickhouse_mysql_test.go:1269: Finished Status Canceled
    clickhouse_mysql_test.go:1233: Failed to connect temporal client: failed reaching server: context deadline exceeded
--- FAIL: TestPeerFlowE2ETestSuiteMySQL_CH_Cluster/Test_MySQL_Column_Position_Shifting_DDL_Error (24.43s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: Both failing matrix jobs hit timing-related issues: the maria/8.0/latest job hit a global 900s test-suite timeout (panic: test timed out after 15m0s) killing dozens of unrelated tests, and the mysql-pos/7.0/stable job failed because a WaitFor polling loop never received an expected DDL error message within its window — both are classic CI slowness/flake patterns with no code-logic error.
Confidence: 0.92

✅ Automatically retrying the workflow

View workflow run

Replace string-match classification with a MySQLGeometryParseError
wrapper so the MySQL source is encoded in the type. Only classify
the known "LinearRing not closed" message; other go-geos parse
failures fall through to ErrorOther so they remain visible in
telemetry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@ilidemi ilidemi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done with the negative unit test

@Jeremyyang920 Jeremyyang920 merged commit 67338f8 into main May 5, 2026
14 checks passed
@Jeremyyang920 Jeremyyang920 deleted the classify-mysql-geometry-linear-ring-error branch May 5, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants